﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<ali:Get ID="Config" Object="InstanceConfig" Operation="GetGlobalSettings()" Validate="True" />
<section data-page="config_global" data-title="全局设置" data-lang="<%=ContentLang%>">
	<dl class="path1">
		<dt><span>您的位置：</span>全局设置</dt>
	</dl>
	<form action="" class="post">
		<div class="post-body">
			<div class="ali-tabs" data-event="click">
				<div class="ali-tabs-header">
					<div class="ali-tabs-nav-container">
						<ul>
							<li><a href="basic.aspx?Lang=<%=ContentLang%>" target="ali-navtab">基本设置</a></li>
							<li><a href="email.aspx?Lang=<%=ContentLang%>" target="ali-navtab">邮件设置</a></li>
							<li><a href="water_mark.aspx?Lang=<%=ContentLang%>" target="ali-navtab">水印设置</a></li>
							<li><a href="white_list.aspx?Lang=<%=ContentLang%>" target="ali-navtab">白名单</a></li>
							<li><a href="black_list.aspx?Lang=<%=ContentLang%>" target="ali-navtab">黑名单</a></li>
							<li><a href="keyword_filter.aspx?Lang=<%=ContentLang%>" target="ali-navtab">关键词过滤</a></li>
							<li class="ali-active"><a>全局设置</a></li>
						</ul>				
					</div>
				</div>
				<div class="ali-tabs-body">
					<div class="ali-tabs-panel"></div>
					<div class="ali-tabs-panel"></div>
					<div class="ali-tabs-panel"></div>
					<div class="ali-tabs-panel"></div>
					<div class="ali-tabs-panel"></div>
					<div class="ali-tabs-panel"></div>
					<div class="ali-tabs-panel">
						<table class="post-table margin2">
							<tr>
								<th>系统版本：</th>
								<td><%=Config[SystemVersion]%></td>
							</tr>
							<%If !String.IsNullOrEmpty(Config[Version])%>
								<tr>
									<th>软件版本：</th>
									<td><%=Config[Version]%></td>
								</tr>
							<%EndIf%>
							<tr>
								<th>网站域名：</th>
								<td><input type="text" name="Domain" value="<%=Config[Domain]%>" size="60" maxlength="255" class="ali-input"> 以http://开头，以斜杠（/）结束</td>
							</tr>
							<%--
							<tr>
								<th>数据库提供者：</th>
								<td>
									<select name="DatabaseProvider">
										<option value="OleDb">OleDb</option>
									</select>
								</td>
							</tr>
							--%>
							<tr>
								<th>是否保护连接字符串：</th>
								<td>
									<%If Convert.ToBoolean(Config[ProtectConnectionString])%>
										<label><input type="radio" name="ProtectConnectionString" value="true" checked>是</label>
										<label><input type="radio" name="ProtectConnectionString" value="false">否</label>
									<%Else%>
										<label><input type="radio" name="ProtectConnectionString" value="true">是</label>
										<label><input type="radio" name="ProtectConnectionString" value="false" checked>否</label>
									<%EndIf%>
								</td>
							</tr>
							<tr>
								<th>连接字符串：</th>
								<td>
									<input type="text" name="ConnectionString" value="<%=Config[ConnectionString]%>" size="80" maxlength="255" class="ali-input">
									<br>{#WebPath#}表示网站根目录，{#DataPath#}表示数据目录
								</td>
							</tr>
							<tr>
								<th>网页瘦身：</th>
								<td>
									<%If Convert.ToBoolean(Config[ClearWhiteSpace])%>
										<label><input type="checkbox" name="ClearWhiteSpace" checked>清除空白</label>
									<%Else%>
										<label><input type="checkbox" name="ClearWhiteSpace">清除空白</label>
									<%EndIf%>
			
									<%If Convert.ToBoolean(Config[ClearHtmlComment])%>
										<label><input type="checkbox" name="ClearHtmlComment" checked>清除Html注释</label>
									<%Else%>
										<label><input type="checkbox" name="ClearHtmlComment">清除Html注释</label>
									<%EndIf%>
			
									<%If Convert.ToBoolean(Config[ClearScriptComment])%>
										<label><input type="checkbox" name="ClearScriptComment" checked>清除脚本注释</label>
									<%Else%>
										<label><input type="checkbox" name="ClearScriptComment">清除脚本注释</label>
									<%EndIf%>
								</td>
							</tr>
							<%--
							<tr>
								<th>GZip：</th>
								<td>
									<%If Convert.ToBoolean(Config[GZipEnabled])%>
										<label><input type="radio" name="GZipEnabled" value="true" checked>启用</label>
										<label><input type="radio" name="GZipEnabled" value="false">禁用</label>
									<%Else%>
										<label><input type="radio" name="GZipEnabled" value="true">启用</label>
										<label><input type="radio" name="GZipEnabled" value="false" checked>禁用</label>
									<%EndIf%>
								</td>
							</tr>
							--%>
							<tr>
								<th>静态文件GZip压缩：</th>
								<td>
									<%If Convert.ToBoolean(Config[StaticFileGZipEnabled])%>
										<label><input type="radio" name="StaticFileGZipEnabled" value="true" checked>启用</label>
										<label><input type="radio" name="StaticFileGZipEnabled" value="false">禁用</label>
									<%Else%>
										<label><input type="radio" name="StaticFileGZipEnabled" value="true">启用</label>
										<label><input type="radio" name="StaticFileGZipEnabled" value="false" checked>禁用</label>
									<%EndIf%>
								</td>
							</tr>
							<tr>
								<th>智能更新：</th>
								<td>
									<%If Convert.ToBoolean(Config[DisableSmartUpdate])%>
										<label><input type="radio" name="DisableSmartUpdate" value="false">启用</label>
										<label><input type="radio" name="DisableSmartUpdate" value="true" checked>禁用</label>
									<%Else%>		
										<label><input type="radio" name="DisableSmartUpdate" value="false" checked>启用</label>
										<label><input type="radio" name="DisableSmartUpdate" value="true">禁用</label>
									<%EndIf%>
								</td>
							</tr>
							<%--
							<tr style="display:none">
								<th>阿里加速器：</th>
								<td>
									<%If Convert.ToString(Config[AliCache]) != ""%>
										<label><input type="radio" name="EnableAliCache" value="true" checked>启用</label>
										<label><input type="radio" name="EnableAliCache" value="false">禁用</label>
										
										<div>
											数据库连接字符串：<input type="text" name="AliCache" value="<%=Config[AliCache]%>" size="60" maxlength="255" class="ali-input">
											<br>{#WebPath#}表示网站根目录，{#DataPath#}表示数据目录。
										</div>
									<%Else%>		
										<label><input type="radio" name="EnableAliCache" value="true">启用</label>
										<label><input type="radio" name="EnableAliCache" value="false" checked>禁用</label>
										
										<div style="display:none">
											数据库连接字符串：<input type="text" name="AliCache" value="<%=Config[AliCache]%>" size="60" maxlength="255" class="ali-input">
											<br>{#WebPath#}表示网站根目录，{#DataPath#}表示数据目录。
										</div>
									<%EndIf%>
								</td>
							</tr>
							<tr>
								<th>伪404：</th>
								<td>
									<%If Convert.ToBoolean(Config[Fake404])%>
										<label><input type="radio" name="Fake404" value="true" checked>启用</label>
										<label><input type="radio" name="Fake404" value="false">禁用</label>
									<%Else%>
										<label><input type="radio" name="Fake404" value="true">启用</label>
										<label><input type="radio" name="Fake404" value="false" checked>禁用</label>
									<%EndIf%>
									<br>当网站首页能打开，但是其他页面出现404错误时，并且空间设置不能改变的情况下，启用此设置。
									<br>空间设置方法：1）启动IIS。2）打开你的网站属性。3）切换到”主目录“。3）点击”配置“。4）切换到”映射“。5）列表中选择”.aspx“，点击”编辑“。6）选中”检查文件是否存在“。
									<br>空间设置好了之后，可以禁用此设置。
								</td>
							</tr>
							--%>
							<tr>
								<th>网站调试：</th>
								<td>
									<%If Convert.ToBoolean(Config[OnlyAdminCanDebug])%>
										<label><input type="checkbox" name="OnlyAdminCanDebug" checked>只有管理员可以调试</label>
									<%Else%>
										<label><input type="checkbox" name="OnlyAdminCanDebug">只有管理员可以调试</label>
									<%EndIf%>
			
									<%If Convert.ToBoolean(Config[DisplayTrace])%>
										<label><input type="checkbox" name="DisplayTrace" checked>显示跟踪</label>
									<%Else%>
										<label><input type="checkbox" name="DisplayTrace">显示跟踪</label>
									<%EndIf%>
								</td>
							</tr>
							<tr>
								<th>不在白名单错误号码：</th>
								<td><input type="text" name="NotInWhiteListErrorCode" value="<%=Config[NotInWhiteListErrorCode]%>" size="10" maxlength="10" class="ali-input"></td>
							</tr>
							<tr>
								<th>不在白名单错误信息：</th>
								<td><textarea type="text" name="NotInWhiteListErrorMessage" cols="60" rows="2" wrap="off" class="ali-input"><%=HttpUtility.HtmlEncode(Config[NotInWhiteListErrorMessage].ToString())%></textarea></td>
							</tr>
							<tr>
								<th>暂时关闭网站：</th>
								<td>
									<%If Convert.ToBoolean(Config[ShutDown])%>
										<label><input type="radio" name="ShutDown" value="true" checked>是</label>
										<label><input type="radio" name="ShutDown" value="false">否</label>
									<%Else%>
										<label><input type="radio" name="ShutDown" value="true">是</label>
										<label><input type="radio" name="ShutDown" value="false" checked>否</label>
									<%EndIf%>
								</td>
							</tr>
							<tr>
								<th>关闭网站的原因：</th>
								<td><textarea type="text" name="ShutDownReason" cols="60" rows="4" wrap="off" class="ali-input"><%=HttpUtility.HtmlEncode(Config[ShutDownReason].ToString())%></textarea></td>
							</tr>
							<tr>
								<th>数据目录名称：</th>
								<td><input type="text" name="DataDirectory" value="<%=Config[DataDirectory]%>" maxlength="50" class="ali-input"></td>
							</tr>
							<tr>
								<th>模板目录名称：</th>
								<td><input type="text" name="TemplateDirectory" value="<%=Config[TemplateDirectory]%>" maxlength="50" class="ali-input"></td>
							</tr>
							<tr>
								<th>缓存目录名称：</th>
								<td><input type="text" name="CacheDirectory" value="<%=Config[CacheDirectory]%>" maxlength="50" class="ali-input"></td>
							</tr>
							<tr>
								<th>模块目录名称：</th>
								<td><input type="text" name="ModuleDirectory" value="<%=Config[ModuleDirectory]%>" maxlength="50" class="ali-input"></td>
							</tr>
							<tr>
								<th>公用目录名称：</th>
								<td><input type="text" name="CommonDirectory" value="<%=Config[CommonDirectory]%>" maxlength="50" class="ali-input"></td>
							</tr>
						</table>
					</div>
				</div>
				<div class="ali-tabs-bottom"><b></b></div>
			</div>
		</div>
		<div class="post-footer"><button type="submit" class="ali-button">保 存</button></div>
	</form>
</section>